//
//  LWNetWorkTools.h
//  1.28  weibo
//
//  Created by mac on 15/2/28.
//  Copyright (c) 2015年 mac. All rights reserved.
//

#import "AFHTTPSessionManager.h"
@class LWUser;
@class LWUnReadCount;
@class LWAccount;
@class LWstatuses;
@class LWStatuseSendRequest;
@class LWStatuseRequset;
@class LWStatuseResult;

typedef void (^successBluok)(LWUser *user);
typedef void (^failureBlock)(NSError *error);
@interface LWNetWorkTools : AFHTTPSessionManager
/**
 *  网络工具类单例
 */
+ (instancetype )shareNetWorkTools;

/**
 *  获取用户的信息
 */
- (void)loadUserInfo:(successBluok)success failure:(failureBlock)failure;
/**
 *  获取未读数
 */
- (void)loadUnreadCount:(void (^)(LWUnReadCount *unReadCount))success failure:(failureBlock)failure;
/**
 *  获取用户的授权
 */
- (void)loadAccessTokenWithCode:(NSString *)code success:(void (^)(LWAccount *account))success failure:(failureBlock)failure;
/**
 *  发送微博
 */
- (void)sendMessageWithParameters:(LWStatuseSendRequest *)parameters success:(void (^)(LWstatuses *statuse))success failure:(failureBlock)failure;
/**
 *  获取微博数据
 */
- (void)loadHomeStatusesWithParameters:(LWStatuseRequset *)parameters success:(void (^)(LWStatuseResult *result))success failure:(failureBlock)failure;
@end
